package com.nuoniu.sibanyun.entity.expenses;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 费用中心-收支明细
 * </p>
 *
 * @author 小啊刚
 * @since 2022-05-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("expenses_balance_change_record")
@ApiModel(value="ExpensesBalanceChangeRecord对象", description="费用中心-收支明细")
public class ExpensesBalanceChangeRecord extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "租户ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "流水号")
    @TableField("serial_num")
    private Integer serialNum;

    @ApiModelProperty(value = "交易时间")
    @TableField("transaction_time")
    private LocalDateTime transactionTime;

    @ApiModelProperty(value = "交易类型 Recharge 余额充值； Deduction 余额扣费；Deposit 保证金充值; DeDeposit 保证金扣费 等")
    @TableField("transaction_type")
    private String transactionType;

//    @ApiModelProperty(value = "交易子类型 Re_Recharge 现金充值;De_Month 按月付费；De_Year 按年付费")
//    @TableField("transaction_child_type")
//    private String transactionChildType;

    @ApiModelProperty(value = "交易渠道 Balance：余额  Deposit 保证金  WeChat：微信 AliPay：支付宝")
    @TableField("transaction_channel")
    private String transactionChannel;

    @ApiModelProperty(value = "入账(元)")
    @TableField("in_amount")
    private BigDecimal inAmount;

    @ApiModelProperty(value = "支出(元)")
    @TableField("out_amount")
    private BigDecimal outAmount;

    @ApiModelProperty(value = "变动之前余额")
    @TableField("before_change_balance")
    private BigDecimal beforeChangeBalance;

    @ApiModelProperty(value = "变动之后余额")
    @TableField("after_change_balance")
    private BigDecimal afterChangeBalance;

    @ApiModelProperty(value = "变动之前保证金")
    @TableField("before_change_deposit")
    private BigDecimal beforeChangeDeposit;

    @ApiModelProperty(value = "变动之后保证金")
    @TableField("after_change_deposit")
    private BigDecimal afterChangeDeposit;

    @ApiModelProperty(value = "摘要")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "来源订单号")
    @TableField("source_order_no")
    private String sourceOrderNo;


}
